package com.eshore.norm.pattern.decorator;

/**
 * 装饰者模式
 *
 * @author: v-chenjl62
 * @date: 2024/2/5 15:10
 */
public class Client {
    public static void main(String[] args) {
        FastFood friedRice = new FriedRice();
        System.out.println(friedRice.cost());
        System.out.println(friedRice.getDesc());
        System.out.println("========================>");

        FastFood garnish = new Bacon(friedRice);
        System.out.println(garnish.cost());
        System.out.println(garnish.getDesc());
        System.out.println("========================>");

        FastFood egg = new Egg(garnish);
        System.out.println(egg.cost());
        System.out.println(egg.getDesc());
    }
}
